<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>人脸后台管理系统</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="shortcut icon" type="image/x-icon" href="https://wwl.ycws.cc/image/backgroundimage/e.ico">
	<script type="text/javascript" src="js/socket.io-1.3.5.min.js"></script>
	<script type="text/javascript" src="js/yunba-js-sdk.js"></script>
	<script src="js/jquery-1.8.3.js"></script>
	<script>
		$(document).ready(function(){
			$("#button").click(function(){
				var user = $("#user").val();
				var password = $("#password").val();
				if(user == ""){
					alert("用户名不能为空");
				}else if(password == ""){
					alert("密码不能为空");
				}else{
					$.ajax({
						url:"<%=path%>/user/login",
						data:{
							user:user,
							password:password
						},
						type:"post",
						success:function(data){
							if(data != "fail"){
								window.open("<%=path%>/pc/selectByPage?result="+1+"&id="+data+"&pageCurrent="+0,"_self");
							}else{
								alert("用户名或密码错误！");
							}
						}
					});
				}
			});
		});
	</script>
  </head>
  <body >
  
  <div align="center" >
  <div style="padding-right: 1000px;"><img src="images/eanquan.png"></div>
  
  <div style="height: 10px;"></div>
  
  <div style="background:url(images/login.png) no-repeat; height: 80%;  background-size:100%;">
  
  		<div style="padding-left: 620px; padding-top: 180px;">
  		<form action="<%=path%>/user/login" method="post">
  		<table cellpadding="0" cellspacing="0" border="0px" align="center" style="background-color: white;">
  			<tr height="60px;"><td colspan="3"></td></tr>
  			<tr>
  				<td>&nbsp;&nbsp;</td>
  				<td style="width:30px; height: 40px;" align="center"><img src="images/user.png"></td>
  				<td><input type="text" name="user" id="user" value="" style="width: 300px; height: 40px; "/>&nbsp;&nbsp;</td>
  			</tr>
  			<tr height="30px;"><td colspan="3"></td></tr>
  			<tr>
  				<td></td>
  				<td style="width:30px; height: 40px;" align="center"><img src="images/password.png"></td>
  				<td><input type="password" name="password" id="password" value="" style="width: 300px; height: 40px;"/></td>
  			</tr>
  			
  			<tr height="30px;"><td colspan="3" align="right"><a href="updatepassword.jsp" style="text-decoration: none;">忘记密码?&nbsp;&nbsp;</a></td></tr>
  			
  			<tr>
  				<td></td>
  				<td colspan="2"><input type="button" id="button" value="登录"  style="width: 332px; height: 40px; color:white; background-color: #217AD8; font-size: 20px;"/></td>
  			</tr>
  			
  			<tr height="60px;"><td colspan="3" align="center" style="color: red;"><input type="hidden" value="${result}">${yfalse}</td></tr>
  		</table>
  	</form>	
  	</div>
  </div>
  <p style="height:15px;"></p>
  <p>咨询电话：0755-86133729　　公司地址：广东省深圳市龙华新区留仙大道24号彩悦大厦10楼</p>
  <p>&copy;   2013-2015深圳市万物联有限公司版权所有　　丨　　　粤ICP备13071979号-2</p>
  </div>
  </body>
</html>
